#import "ETVCcontractDetailHouseOwner.h"
#import "Hcolors.h"
@implementation ETVCcontractDetailHouseOwner

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.nameLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, 80, 24)];
        self.nameLabel.textColor = COLOR_NEW_153;
        self.nameLabel.text = @"姓名";
        self.nameLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.nameLabel];
        
        self.detailNameLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.nameLabel.frame.origin.x + self.nameLabel.frame.size.width + 10, 10, 80, 24)];
        self.detailNameLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.detailNameLabel];
        
        self.zeroLineLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 44, [UIScreen mainScreen].bounds.size.width, 0.5)];
        self.zeroLineLabel.backgroundColor = COLOR_NEW_237;
        [self addSubview:self.zeroLineLabel];
        
        self.indentityLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, self.zeroLineLabel.frame.origin.y + self.zeroLineLabel.frame.size.height  +10, 80, 24)];
        self.indentityLabel.text = @"身份证号";
        self.indentityLabel.textColor = COLOR_NEW_153;
        self.indentityLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.indentityLabel];
        
        self.indentityNumberLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.indentityLabel.frame.origin.x + self.indentityLabel.frame.size.width + 10, self.zeroLineLabel.frame.origin.y + self.zeroLineLabel.frame.size.height  +10, [UIScreen mainScreen].bounds.size.width - 10 - 10 - 80, 24)];
        self.indentityNumberLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.indentityNumberLabel];
        
        self.lineOneLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 88.5, [UIScreen mainScreen].bounds.size.width, 0.5)];
        self.lineOneLabel.backgroundColor = COLOR_NEW_237;
        [self addSubview:self.lineOneLabel];
        
        //手机(固定的文字)
        self.phoneLable = [[UILabel alloc]initWithFrame:CGRectMake(10, self.lineOneLabel.frame.origin.y + self.lineOneLabel.frame.size.height + 10, 80, 24)];
        self.phoneLable.text = @"手机";
        self.phoneLable.textColor = COLOR_NEW_153;
        self.phoneLable.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.phoneLable];
        
        self.phoneNumberLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.phoneLable.frame.origin.x + self.phoneLable.frame.size.width + 10, self.lineOneLabel.frame.origin.y + self.lineOneLabel.frame.size.height + 10, 100, 24)];
        self.phoneNumberLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.phoneNumberLabel];
        
        self.lineTwoLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 133, [UIScreen mainScreen].bounds.size.width, 0.5)];
        self.lineTwoLabel.backgroundColor = COLOR_NEW_237;
        [self addSubview:self.lineTwoLabel];
        
        self.mailLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, self.lineTwoLabel.frame.origin.y + self.lineTwoLabel.frame.size.height + 10, 120, 24)];
        self.mailLabel.text = @"合同送达地址";
        self.mailLabel.textColor = COLOR_NEW_153;
        self.mailLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.mailLabel];
        
        self.mailNumberLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.mailLabel.frame.origin.x + self.mailLabel.frame.size.width + 2, self.lineTwoLabel.frame.origin.y + self.lineTwoLabel.frame.size.height + 10, [UIScreen mainScreen].bounds.size.width - 10 - 120, 24)];
        self.mailNumberLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.mailNumberLabel];
        
        self.lineThreeLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 177.5, [UIScreen mainScreen].bounds.size.width, 0.5)];
        self.lineThreeLabel.backgroundColor = COLOR_NEW_237;
        [self addSubview:self.lineThreeLabel];
        
        self.contractAddressLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, self.lineThreeLabel.frame.origin.y + self.lineThreeLabel.frame.size.height + 10, 120, 24)];
        self.contractAddressLabel.text = @"居住地址";
        self.contractAddressLabel.textColor = COLOR_NEW_153;
        self.contractAddressLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.contractAddressLabel];
        
        self.contractAddressDetailLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.contractAddressLabel.frame.origin.x + self.contractAddressLabel.frame.size.width + 2, self.lineThreeLabel.frame.origin.y + self.lineThreeLabel.frame.size.height + 10, [UIScreen mainScreen].bounds.size.width - self.contractAddressLabel.frame.size.width - 10, 24)];
        self.contractAddressDetailLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.contractAddressDetailLabel];
        
        self.lineFourLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 222, [UIScreen mainScreen].bounds.size.width, 0.5)];
        self.lineFourLabel.backgroundColor = COLOR_NEW_237;
        [self addSubview:self.lineFourLabel];
        
        //备用联系人姓名(固定文字)
        self.beiYongNameLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, self.lineFourLabel.frame.origin.y + self.lineFourLabel.frame.size.height + 10, 120, 24)];
        self.beiYongNameLabel.text = @"备用联系人姓名";
        self.beiYongNameLabel.textColor = COLOR_NEW_153;
        self.beiYongNameLabel.font= [UIFont systemFontOfSize:15];
        [self addSubview:self.beiYongNameLabel];
        
        self.beiYongNameDetailLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.beiYongNameLabel.frame.origin.x + self.beiYongNameLabel.frame.size.width + 2, self.lineFourLabel.frame.origin.y + self.lineFourLabel.frame.size.height + 10, 150, 24)];
        self.beiYongNameDetailLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.beiYongNameDetailLabel];
        
        self.lineFiveLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, 266, [UIScreen mainScreen].bounds.size.width, 0.5)];
        self.lineFiveLabel.backgroundColor = COLOR_NEW_237;
        [self addSubview:self.lineFiveLabel];
        
        //备用联系人电话(固定文字)
        self.beiYongPhoneLabel = [[UILabel alloc]initWithFrame:CGRectMake(10, self.lineFiveLabel.frame.origin.y + self.lineFiveLabel.frame.size.height + 10, 120, 24)];
        self.beiYongPhoneLabel.text = @"备用联系人电话";
        self.beiYongPhoneLabel.textColor = COLOR_NEW_153;
        self.beiYongPhoneLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.beiYongPhoneLabel];
        
        self.beiYongPhoneNumberLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.beiYongPhoneLabel.frame.origin.x + self.beiYongPhoneLabel.frame.size.width + 2, self.lineFiveLabel.frame.origin.y + self.lineFiveLabel.frame.size.height + 10, 100, 24)];
        self.beiYongPhoneNumberLabel.textAlignment = NSTextAlignmentRight;
        self.beiYongPhoneNumberLabel.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.beiYongPhoneNumberLabel];
    }
    return self;
}

- (void)setContent:(McontractDetailModel *)contractOneSextion{
    self.detailNameLabel.text = contractOneSextion.lessorName;
    self.indentityNumberLabel.text = contractOneSextion.lessorIdNo;
    self.phoneNumberLabel.text = contractOneSextion.lessorMobile;
    self.mailNumberLabel.text = contractOneSextion.lessorAddress;
    self.contractAddressDetailLabel.text = contractOneSextion.lessorAddress;
    self.beiYongNameDetailLabel.text = contractOneSextion.lessorBackupName;
    self.beiYongPhoneNumberLabel.text = contractOneSextion.lessorBackupTel;
}



@end
